package com.middleware.mvc.handlerAdapter;

import com.middleware.mvc.model.ModelAndView;
import com.sun.istack.internal.Nullable;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public interface HandlerAdapter {
    // 判断此适配器是否支持给定的处理器（Controller）
    boolean supports(Object handler);

    // 使用适配器调用处理器，返回ModelAndView
    @Nullable
    void handle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception;
}
